package org.xindian.lbstest.lbs;

public class GSMCell implements Comparable<GSMCell> {
	public int cid = -1;
	public int lac = -1;
	public long time = 0L;

	public GSMCell(int cid, int lac, long time) {
		this.cid = cid;
		this.lac = lac;
		this.time = time;
	}

	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof GSMCell)) {
			return false;
		}
		GSMCell cell = (GSMCell) o;
		return (this.cid == cell.cid) && (this.lac == cell.lac);
	}

	//@Override
	public int compareTo(GSMCell another) {
		if (this.time == another.time)
			return 0;
		if (this.time < another.time) {
			return 1;
		}
		return -1;
	}

	public int hashCode() {
		int result = 17;
		result = 31 * result + this.cid;
		result = 31 * result + this.lac;
		return result;
	}
}
